<?php defined('SEJUJOPEFDNGJSL') or exit('Access denied');?>
<?php
    $data['phone'] = $_SESSION['phone'];
    $pcode=$_SESSION['pcode'];
    $mobile_code = $_SESSION['mobile_code'];
    if(empty($pcode)){
        header("Location: /r1.php");
        exit;
    }
    if($pcode!=$mobile_code){
        header("Location: /r1.php");
        exit;
    }
    //以下为根据get值
    if(empty($_GET['tid'])){
        $tname="";
        $tphone="";
    }else{
        $tid=checkstr($_GET['tid']);
        $sql="select uname from ld_user_info where uname='$tid' ";
        $users=$member->getuserinfo($tid,1);

        if(empty($users)){
            $tname='';
            $tphone='';
        }else{
            if($users["is_passed"]==0){
                $tname='';
                $tphone='';
				echo "您的推荐人未激活，请重新找推荐人！";
				exit;
            }else{
				if($users['is_freezed']==1){
					$tname='';
					$tphone='';
					echo "您的推荐人被封号，请重新找推荐人！";
					exit;
				}else{
					$tname=$users["uname"];
					$tphone=$users["phone"];
				}
            }
        }
    }
	$sql="select * from ld_regconfig where field_name='rgmbq'";
	$db->query($sql,2);
	$rgmbq = $db->rs;
	$rmbq=explode('|',$rgmbq['field_option']);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta name="renderer" content="webkit">
<link rel="Bookmark" href="favicon.ico" >
<link rel="Shortcut Icon" href="favicon.ico" />
<script type="text/javascript" src="/public/home/js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script type="text/javascript" src="/public/home/js/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="/public/home/js/jquery.cycle.all.min.js"></script>
<link href="public/home/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="/public/home/css/H-ui.reset.css" rel="stylesheet" type="text/css" />
<link href="public/home/css/animate.css" rel="stylesheet" type="text/css" />
<link href="/public/home/css/style.css" rel="stylesheet" type="text/css" /><!--自己的样式-->
<link href="/public/home/css/plugs.css" rel="stylesheet" type="text/css" /><!--自己的样式-->
<style type="text/css">
.layui-layer-ico{background-color:#3f51b5!important;}
</style>
<script type="text/javascript" src="<?php echo SITETHEME;?>js/main.js"></script>
<script type="text/javascript" src="<?php echo SITETHEME;?>art/artDialog.source.js?skin=simple"></script>
<script type="text/javascript">
var YUMING="<?php echo YUMING;?>";
</script>
<script type="text/javascript" src="<?php echo SITETHEME;?>js/reg.js"></script>
<script type="text/javascript" src="<?php echo SITETHEME;?>js/tip.js"></script>
<script type="text/javascript">
    var rgpwd1=0, rgpwd2=0,rgmbq=0,rgmba=0,rgmobile=0,rgemail=undefined,rgcard=undefined,rgweixin=undefined,rgqq=undefined,rgfax=undefined,rgaddress=undefined;
</script>
<title><?php echo $GLOBALARR['sytitle'] ?></title>
<meta name="Keywords" content="<?php echo $GLOBALARR['sytitle'] ?>">
<meta name="Description" content="<?php echo $GLOBALARR['sytitle'] ?>">
</head>
<body>
<style>
    .stipyes{display: none;}
    .title_login{font-size: 16px;font-weight: normal;text-align: center;margin-bottom: 18px;color:#6a6c6f;}
    .form-horizontal .form-group{margin-left:0;margin-right: 0;}
    .form-control{-webkit-box-shadow: none;box-shadow: none;border:none;border-bottom: 1px solid #eee;height: 40px;color:#999;}
</style>
    <div class="zhuce-box" style="min-height: 100%;position: relative;padding-bottom: 80px;">
       <div class="w-d">
            <p class="ftpasstop">
                  <img src="public/home/images/sas-logo1.png" class=" animated zoomIn" alt="">
                </p>
           <div class="zhuce  mt-45"  style="width:90%;max-width: 320px;padding:24px;">

                <form name="theform" action="regs.php" method="post" onsubmit="return register()" class="form-horizontal">
					<input type="hidden" name="act" value="add">
					<input type="hidden" name="ulevel" value="0">
					<div class="zhuce-from mt-10" style="width:100%;">
                        <div class="form-group">
                            <div class="ui-sortable">
                                <input type="text" class="form-control" name="userid" id="userid"  required="required" placeholder="用户名" />
                            </div>
                        </div>
                        <!-- <div class="regbox3">
                            <label>用户名</label>
                            <input type="text" class="input-text reginput" name="userid" id="userid"  required="required" />
                        </div> -->
                        <!-- <div class="form-group">
                            <label class="col-md-3 control-label ui-sortable">昵称</label>
                            <div class="col-md-9 ui-sortable">
                                <input type="text" class="form-control" name="nickname" id="nickname"  required="required"/>
                            </div>
                        </div> -->
                        <!-- <div class="regbox3">
                            <label>昵称</label>
                            <input type="text" class="input-text reginput" name="nickname" id="nickname"  required="required"/>
                        </div> -->
                       <!--  <div class="form-group">
                            <label class="col-md-3 control-label ui-sortable">真实姓名</label>
                            <div class="col-md-9 ui-sortable">
                                <input type="text" class="form-control" name="username" id="username"  required="required"/>
                            </div>
                        </div> -->
                        <!-- <div class="regbox3">
                            <label>真实姓名</label>
                            <input type="text" class="input-text reginput" name="username" id="username"  required="required"/>
                        </div> -->
                        <div class="form-group">
                            <div class="ui-sortable">
                                <input type="text" placeholder="手机号" class="form-control" name="rgmobile"  id="rgmobile"  required="required" readonly="readonly" value="<?php echo $data['phone'];?>"/>
                            </div>
                        </div>
                        <!-- <div class="regbox3">
                            <label>手机号</label>
                            <input type="text" class="input-text reginput" name="rgmobile"  id="rgmobile"  required="required" readonly="readonly" value="<?php echo $data['phone'];?>"/>
                        </div> -->
                        <div class="form-group">
                            <div class="ui-sortable">
                                <input type="password" placeholder="登录密码" class="form-control" name="rgpwd1" id="rgpwd1" required="required" autocomplete="off" >
                            </div>
                        </div>
                       <!-- <div class="regbox3">
                            <label>设置登录密码</label>
                            <input type="password" class="input-text reginput1" name="rgpwd1" id="rgpwd1" required="required" autocomplete="off" >
                        </div> -->
                        <div class="form-group">
                            <div class="ui-sortable">
                                <input type="password" placeholder="确认登录密码"  class="form-control" name="rgpwd11"  id="rgpwd11"  required="required" autocomplete="off" />
                            </div>
                        </div>
                        <!-- <div class="regbox3">
                            <label>确认登录密码</label>
                            <input type="password" class="input-text reginput" name="rgpwd11"  id="rgpwd11"  required="required" autocomplete="off" />
                        </div> -->
                        <div class="form-group">
                            <div class="ui-sortable">
                                <input type="password" placeholder="交易密码"  class="form-control" name="rgpwd2"  id="rgpwd2" required="required" autocomplete="off"/>
                            </div>
                        </div>
                        <!-- <div class="regbox3">
                            <label>交易密码</label>
                            <input type="password" class="input-text reginput" name="rgpwd2"  id="rgpwd2" required="required" autocomplete="off"/>
                        </div> -->
                        <div class="form-group">
                            <div class="ui-sortable">
                                <input placeholder="确认交易密码"  type="password" class="form-control" name="rgpwd21"  id="rgpwd21" required="required" autocomplete="off" />
                            </div>
                        </div>
                        <!-- <div class="regbox3">
                            <label>确认交易密码</label>
                            <input type="password" class="input-text reginput" name="rgpwd21"  id="rgpwd21" required="required" autocomplete="off" />
                        </div> -->
                        <div class="form-group">
                            <div class="ui-sortable">
                                <input type="text" placeholder="推荐人账号" class="form-control" name="tuname" id="tuname" required="required"   value="<?php echo $tname;?>" autocomplete="off" />
                            </div>
                        </div>
                        <!-- <div class="regbox3">
                            <label>推荐人账号</label>
                            <input type="text" class="input-text reginput" name="tuname" id="tuname" required="required"   value="<?php echo $tname;?>" autocomplete="off" />
                        </div> -->
                        <!-- <div class="form-group">
                            <label class="col-md-3 control-label ui-sortable">推荐人电话号码</label>
                            <div class="col-md-9 ui-sortable">
                                <input type="text" class="form-control" name="tphone" id="tphone" required="required"  value="<?php echo $tphone;?>" />
                            </div>
                        </div> -->
                        <!-- <div class="regbox3">
                            <label>推荐人电话号码</label>
                            <input type="text" class="input-text reginput" name="tphone" id="tphone" required="required"  value="<?php echo $tphone;?>" />
                        </div> -->
                       <!--  <div class="form-group">
                            <label class="col-md-3 control-label ui-sortable">选择密保问题</label>
                            <div class="col-md-9 ui-sortable">
                                <select  name="mbq" id="mbq" class="form-control" required="required">
                                    <?php foreach ($rmbq as $kk => $vv) {
                                    ?>
                                    <option <?php echo $kk==4 ? "selected='selected'" : "" ?> value="<?php echo $kk?>"><?php echo $vv?></option>
                                    <?php
                                    }?>
                                </select>
                            </div>
                        </div> -->
                       <!--  <div class="form-group">
                            <label class="col-md-3 control-label ui-sortable">密保答案</label>
                            <div class="col-md-9 ui-sortable">
                                <input type="text" class="form-control" id="rgmba"  name="rgmba" required="required"/>
                            </div>
                        </div> -->
                        <!-- <div class="regbox3">
                            <label>密保答案</label>
                           <input type="text" class="input-text reginput" id="rgmba"  name="rgmba" required="required"/>
                        </div> -->
                        <div class="form-group">
                            <div class="ui-sortable">
                                <div class="row">
                                    <div class="col-md-7 col-xs-7">
                                        <input placeholder="验证码"  type="text" class="form-control vcode-text" name="vcode" id="code" required="required">
                                    </div>
                                    <div class="col-md-5 col-xs-5">
                                        <img class="vcode" id="vcode" alt="" src='/include/code.php' onclick='this.src="/include/code.php?"+Math.random()'   style='height:40px;border-radius: 3px;width:106px;'>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- <div class="regbox3">
                            <label>验证码</label>
                           <input type="text" class="vcode-text" name="vcode" id="code" required="required">
                            <img class="vcode" id="vcode" alt="" src='/include/code.php' onclick='this.src="/include/code.php?"+Math.random()'>
                        </div> -->
                        <div class="form-group">
                            <div class="ui-sortable">
                                <input id="mobileAcceptIpt" name="mobileAcceptIpt" type="checkbox" checked="checked" tabindex="-1" required="required"><span class="important">阅读并认可《<a onclick="getcpl()" class="color-red" >用户协议</a>》</span>
                            </div>
                        </div>
						<!-- <div class="item">
							 <div class="left-item f-l">
								<span class="title"></span>
							 </div>
							 <div class="right-item f-l">
								 <input id="mobileAcceptIpt" name="mobileAcceptIpt" type="checkbox" checked="checked" tabindex="-1" required="required"><span class="important">已认真阅读《<a onclick="getcpl()" class="color-red" >用户协议</a>》，并完全理解认可所有条款及风险。</span>
							 </div>
						</div> -->
                        <div class="form-group" style="margin-top: 32px;">
                            <div class="ui-sortable">
                                <input type="submit" class="denglubut" value="提交注册" style="width: 100%;" />
                            </div>
                        </div>
						<!-- <div class="regbox3 mt-20">
							 <div class="left-item f-l">
								<span class="title"></span>
							 </div>
							 <div class="right-item f-l">
								<input type="submit" class="input-btn" value="提交注册" />
							 </div>
						</div> -->
					</div>
				</form>
           </div>
       </div>
   </div>
   <script type="text/javascript" src="/public/home/js/layer/layer.js"></script>
   <script type="text/javascript" src="<?php echo SITETHEME;?>js/checkreg.js"></script>
   <script type="text/javascript">
    kuan=$(window).width();
               if(kuan<415){
                    var wid='90%';
                    var hgi='600px';
               }else{
                    var wid='800px';
                    var hgi='600px';
               }
    function getcpl(){
           layer.open({
                type: 1,
                title: ['用户协议', 'font-size:14px;background-color:#3f51b5;color:#fff;'],
                area: [wid, hgi],
                closeBtn: 1,
                shift: 2,
                shadeClose: true,
                content: $('#cpl')
            });
    }
    function getrules(){
           layer.open({
                type: 1,
                title: [<?php echo $GLOBALARR['sytitle'] ?>, 'font-size:14px;background-color:#018101;color:#fff;'],
                area: ['800px', '600px'],
                closeBtn: 1, //不显示关闭按钮
                shift: 2,
                shadeClose: true, //开启遮罩关闭
                content: $('#rules')
            });
    }
   </script>
   <div style="display:none;" id="cpl">
       <div style="padding:10px;font-size:110%">
       <?php echo get_article('注册用户协议');?>
       </div>
   </div>
   <div style="display:none; "id="rules">
       <div style="padding:10px;font-size:110%">
       <?php echo get_article('规章制度');?>
       </div>
   </div>
<!-- <div style="width: 100%;text-align: center;font-size: 14px;color: #413a37;margin-top: -30px;">Copyright ©2016 凯莎国际 版权所有</div> -->
</body>
</html>